package com.toulouse.recyclage;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

import com.toulouse.recyclage.controller.RecyclePlaceController;

public class RecyclageToulouseActivity extends Activity {
	/** Called when the activity is first created. */
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.main);

		// Load the cvs file
		RecyclePlaceController.getInstance().populateGlassRecycle(getResources().openRawResource(R.raw.recupverre));
		RecyclePlaceController.getInstance().populatePackagingRecycle(getResources().openRawResource(R.raw.recupemballage));

		// Button yellowButton = (Button) findViewById(R.id.yellowButton);
		// yellowButton.setOnClickListener(new View.OnClickListener() {
		//
		// @Override
		// public void onClick(View v) {
		// Intent i = new Intent(RecyclageToulouseActivity.this,
		// RecyclePlaceMapsActivity.class);
		// i.putExtra(RecyclePlaceMapsActivity.KEY_DISPLAY_OPTION,
		// RecycleTypeDisplayOption.PACKAGING_CYCLE_TYPE);
		// RecyclageToulouseActivity.this.startActivity(i);
		// }
		// });
		//
		// Button greenButton = (Button) findViewById(R.id.greenButton);
		// greenButton.setOnClickListener(new View.OnClickListener() {
		//
		// @Override
		// public void onClick(View v) {
		// Intent i = new Intent(RecyclageToulouseActivity.this,
		// RecyclePlaceMapsActivity.class);
		// i.putExtra(RecyclePlaceMapsActivity.KEY_DISPLAY_OPTION,
		// RecycleTypeDisplayOption.GLASS_CYCLE_TYPE);
		// RecyclageToulouseActivity.this.startActivity(i);
		// }
		// });

		Button buttonFind = (Button) findViewById(R.id.imageFind);
		buttonFind.setOnClickListener(new View.OnClickListener() {

			@Override
			public void onClick(View v) {
				Intent i = new Intent(RecyclageToulouseActivity.this, FindAddressActivity.class);
				RecyclageToulouseActivity.this.startActivity(i);
			}
		});

		Button buttonInfo = (Button) findViewById(R.id.infoButton);
		buttonInfo.setOnClickListener(new View.OnClickListener() {

			@Override
			public void onClick(View v) {
				Intent i = new Intent(RecyclageToulouseActivity.this, RecycleInfoActivity.class);
				RecyclageToulouseActivity.this.startActivity(i);
			}
		});

		//
		// Button libraryButton = (Button) findViewById(R.id.libraryButton);
		// libraryButton.setOnClickListener(new View.OnClickListener() {
		//
		// @Override
		// public void onClick(View v) {
		// Intent i = new Intent(RecyclageToulouseActivity.this,
		// LibraryListActivity.class);
		// RecyclageToulouseActivity.this.startActivity(i);
		// }
		// });
	}
}